package com.train.system.api;

import com.train.common.constants.ApiConstants;
import com.train.common.resp.CommonResp;
import com.train.system.api.fallback.TrainStationApiFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * trainStation Facade 接口
 * @author baitiaojun
 * @createDate 2025-02-20 16:32:30
 */
@FeignClient(
        contextId = "trainStationFacade",
        name = ApiConstants.SYSTEM_NAME,
        path = ApiConstants.SYSTEM_PREFIX,
        fallback = TrainStationApiFallback.class)
public interface TrainStationApi {

    String PREFIX = "/train-station";

    @PostMapping(PREFIX + "/train-station")
    CommonResp getTrainStationByCode(@RequestBody List<String> trainCodes);

    @PostMapping(PREFIX + "/listByTrainCodes")
    CommonResp getTrainStationListByTrainCodes(@RequestBody List<String> trainCodes);
}
